#ifndef NETWORK_H
#define NETWORK_H

#include <hv/TcpClient.h>
#include <thread>

class Network : public hv::TcpClient
{
public:
    static Network& getInstance();

    // 删除拷贝构造函数和拷贝赋值操作符
    Network(Network const&) = delete;
    Network& operator=(Network const&) = delete;

    void start();

    void join();

private:
    Network();
    ~Network();

    std::shared_ptr<std::thread> networkThread;
};

#endif // NETWORK_H
